using System;

 namespace QLST_DTO 
{
	 [Serializable]
	 public class NHA_CUNG_CAP
	{
	private int maNCC;
	private string tenNCC;
	private string dienThoai;
	private string diaChi;
	public NHA_CUNG_CAP()
	{}
	public NHA_CUNG_CAP(int maNCC,string tenNCC,string dienThoai,string diaChi)
	{
	this.maNCC = maNCC;
	this.tenNCC = tenNCC;
	this.dienThoai = dienThoai;
	this.diaChi = diaChi;
	}
	public int MaNCC{
	get { return this.maNCC;}
	set { if(value==null) 
		throw new Exception("maNCC not allow nullvalue.");
		this.maNCC=value;
	}	}
	public string TenNCC{
	get { return this.tenNCC;}
	set { if(value==null) 
		throw new Exception("tenNCC not allow nullvalue.");
		this.tenNCC=value;
	}	}
	public string DienThoai{
	get { return this.dienThoai;}
	set {this.dienThoai=value;}
	}
	public string DiaChi{
	get { return this.diaChi;}
	set { if(value==null) 
		throw new Exception("diaChi not allow nullvalue.");
		this.diaChi=value;
	}	}
	public override string ToString(){
	return this.maNCC+"; "+this.tenNCC+"; "+this.dienThoai+"; "+this.diaChi+"; ";
	}
	public override bool Equals(Object obj)
	{
	NHA_CUNG_CAP me=(NHA_CUNG_CAP)obj;
	bool ret=this.MaNCC.Equals(me.MaNCC);
	return ret;
	}
	public override int GetHashCode()
	{
	return this.MaNCC.GetHashCode();
	}

	}
} 